/*
 * Constants.java
 *
 * Created on 20 October 2007, 13:50
 *
 */

package net.ubinow.mflex.util;

import javax.microedition.lcdui.Graphics;

/**
 *
 * @author Josh
 */
public interface Constants {   
        
    ///
    // misc
    ///
    public static final String UNDEFINED                = "undefined";             
    public static final int NULL_INT                    = 999;
    
    ///
    // graphics 
    ///
    public static final int GFX_ALIGN_TOP_LEFT          = Graphics.TOP | Graphics.LEFT;
    
    ///
    // alignment 
    ///
    public static final int ALIGN_LEFT                  = 0x000001;
    public static final int ALIGN_CENTRE_H              = 0x000010; // horizontal centre
    public static final int ALIGN_TOP                   = 0x000100;
    public static final int ALIGN_RIGHT                 = 0x001000;
    public static final int ALIGN_CENTRE_V              = 0x010000; // vertical centre
    public static final int ALIGN_BOTTOM                = 0x100000;   
    public static final int ALIGN_CENTRE = Constants.ALIGN_CENTRE_V | Constants.ALIGN_CENTRE_H;
    
    ///
    // colours
    ///
    public static final int COLOUR_BLACK                = 0x000000;
    public static final int COLOUR_WHITE                = 0xffffff;
    public static final int COLOUR_SHADOW               = 0xff00ff;
    public static final int COLOUR_LIGHT_BLUE           = 0xFF9BBFE8;
    
    ///
    // viewing states
    /// 
    public static final int VIEWING_STATE_HIDING        = 0;
    public static final int VIEWING_STATE_SHOWING       = 1;
    public static final int VIEWING_STATE_IN_TRANSITION = 2;
    
    ///
    // widget types 
    ///
    public static final int WIDGET_TYPE_UNDEFINED       = 0;
    public static final int WIDGET_TYPE_BUTTON          = 1;
    public static final int WIDGET_TYPE_TEXTBOX         = 2;            
    public static final int WIDGET_TYPE_DROPDOWN        = 3;
    public static final int WIDGET_TYPE_LIST            = 4;
    public static final int WIDGET_TYPE_AJAX_TEXTBOX    = 5;
        
    ///
    // sizes 
    ///
    public static final int MISC_SCREEN_WIDTH               = 240;
    public static final int MISC_SCREEN_HEIGHT              = 320;    
    
    ///
    // layout
    ///
    public static final int LAYOUT_FLOW                     = 0;
    public static final int LAYOUT_ALIGNED                  = 1;
    
    ///
    // direction constants
    ///
    public static final int DIRECTION_UNDEFINED             = -1;
    public static final int DIRECTION_DOWN                  = 0;
    public static final int DIRECTION_UP                    = 1;
    public static final int DIRECTION_LEFT                  = 2;
    public static final int DIRECTION_RIGHT                 = 3;
    
    ///
    // string flags
    ///
    public static final String FLAG                         = "flag";
    public static final String FLAG_01                      = "flag_01";
    public static final String FLAG_02                      = "flag_02";
    public static final String FLAG_03                      = "flag_03";
    
    //<editor-fold defaultstate="collapsed" desc="application defaults">
    
    // default values (misc)
    public static final int AD_DOCK_DEFAULT                = 0;    
    public static final int AD_ARRAY_EXPAND_FACTOR         = 2; 
    public static final int AD_QUEUE_SIZE                  = 5;
    public static final int AD_ATTACHMENT_SIZE             = 2;
    
    // default positoins
    public static final int AD_POS_HEADER_ICON_X            = 5;
    public static final int AD_POS_HEADER_ICON_Y            = 5;    
    public static final int AD_POS_HEADER_TEXT_X            = 50;
    public static final int AD_POS_HEADER_TEXT_Y            = 18;        
    
    // default paddings
    
    /** horizontal padding surrounding the widget container and widgets **/ 
    public static final int AD_WIDGET_PADDING_H             = 5;
    /** vertical padding surrounding the widget container and widgets **/ 
    public static final int AD_WIDGET_PADDING_V             = 40;
    /** padding between the widgets **/ 
    public static final int AD_WIDGET_PADDING               = 5; 
    
    /** the gap between items, paragraphs etc e.g. used in the dropdown widget to provide vertical space between the items **/
    public static final int AD_ITEM_GAP                     = 6;
    
    /** colour used for highlighting **/ 
    public static final int AD_COLOUR_HIGHLIGHT             = COLOUR_LIGHT_BLUE;
    
    /** horizontal padding between the highlighted item and its parent container **/ 
    public static final int AD_HIGHLIGHT_PADDING_X          = 4;
    
    /** vertical padding between the highlighted item and its parent container **/ 
    public static final int AD_HIGHLIGHT_PADDING_Y          = 2;
            
    /** horizontal padding from the compoent to the components 'inner' text **/ 
    public static final int AD_TEXT_PADDING_X               = 2;
    
    /** horizontal padding from the compoent to the components 'inner' text **/ 
    public static final int AD_AJAX_TEXT_PADDING_X          = 18;

    
    /** vertical padding from the compoent to the components 'inner' text **/ 
    public static final int AD_TEXT_PADDING_Y               = 2; 
    
    // command
    
    /** the left cmd text to display when the menu bar is in transition or showoing **/ 
    public static final String AD_CMD_TEXT_LEFT                = "Select";
    
    /** the right cmd text to display when the menu bar is in transition or showoing **/ 
    public static final String AD_CMD_TEXT_RIGHT               = "Cancel";
    
    /** padding of the command bar text when the command bar is docked **/ 
    public static final int AD_CMD_BAR_TEXT_PADDING_H          = 5; 
    
    /** padding between the edge of the screen and the commands background - background that holds the commands **/
    public static final int AD_CMDS_BAR_BG_PADDING_H            = 5;
    
    /** padding between the edge of the command bar background and the text **/ 
    public static final int AD_CMD_BAR_CMDS_TEXT_PADDING_H     = 9; 
    
    /** maximum characters for a textbox **/ 
    public static final int AD_MAX_CHARS                        = 50;
    
    /** default padding from the x position of the dropdown to the panel **/ 
    public static final int AD_DROPDOWN_PANEL_PADDING_X         = 1;
    
    /** default padding from the y position of the dropdown to the panel **/ 
    public static final int AD_DROPDOWN_PANEL_PADDING_Y         = 2; 
        
    /** default number of items to display at once on the dropdown when expanded **/ 
    public static final int AD_DEFAULT_DROPDOWN_DISPLAY_NUMBER  = 3;
    
    /** default delay in milli-seconds of when to expand a expandable widget container **/ 
    public static final int AD_DEFAULT_EXPANDABLE_CONTAINER_EXPAND_DELAY    = 30;
    
    /** default delay in milli-seconds of when to collapse a expandable widget container **/ 
    public static final int AD_DEFAULT_EXPANDABLE_CONTAINER_COLLAPSE_DELAY  = 30;
    
    //</editor-fold>
    
   
}
